<?php
namespace redis;

use think\cache\driver\Redis;

/**
 * redis功能扩展类
 * @author jack
 */
class JkRedis extends Redis
{
    public function setex($key, $time, $val)
    {
        return $this->handler->setex($key, $time, $val);
    }
 
    public function expire($key = null, $time = 0)
    {
        return $this->handler->expire($key, $time);
    }
 
    public function psubscribe($patterns = array(), $callback)
    {
        $this->handler->psubscribe($patterns, $callback);
    }
 
    public function setOption()
    {
        // 不超时配置
        $this->handler->setOption(\Redis::OPT_READ_TIMEOUT, -1);
    }

}